package com.itheima.io.字符流;

import java.io.*;
import java.util.ArrayList;
import java.util.Arrays;

public class CharDtreamDemo6 {
    public static void main(String[] args) throws IOException {
        //构建输入流对象
        BufferedReader br = new BufferedReader(new FileReader("day12_IO流_字符流\\sort.txt"));

        //定义集合承接数据
        ArrayList<Integer> list = new ArrayList<>();

        //遍历读写
        String numArrStr;
        while ((numArrStr = br.readLine()) != null){
            String[] split = numArrStr.split(" ");
            for (String numStr : split) {
                //类型转换,并存入集合
                list.add(Integer.parseInt(numStr));
            }
        }
        //关流释放资源
        br.close();



        //创建输出流对象
        BufferedWriter bw = new BufferedWriter(new FileWriter("day12_IO流_字符流\\sort.txt"));

        //
    }
}
